export const baseTableProps = {
  // 核心：数据请求函数，返回 { list, total }
  fetcher: { type: Function, required: true },

  // 唯一 key
  rowKey: { type: String, default: "id" },

  // 分页
  page: { type: Boolean, default: true },
  pageSize: { type: Number, default: 10 },
  emptyText: { type: String, default: "暂无数据" },

  // 选择
  selectType: { type: [String, Boolean], default: false }, // 'select' 多选 / 'radio' 单选 / false 不选
  showIndex: { type: Boolean, default: false },
  border: { type: Boolean, default: true },

  // 高度
  height: { type: [Number, String], default: "" },

  // 自动加载
  autoLoad: { type: Boolean, default: true },

  // 树表格
  tree: { type: Boolean, default: false },
  childrenKey: { type: String, default: "" },
  hasChildrenKey: { type: String, default: "" },
  treeProps: { type: Object, default: () => ({}) },

  // 外部过滤条件
  filters: { type: Object, default: () => ({}) },

  // 分页条
  pageLayout: {
    type: String,
    default: "total, sizes, prev, pager, next, jumper",
  },
  pageSizes: { type: Array, default: () => [10, 20, 50, 100] },
  pagerCount: { type: Number, default: 7 },
};
